package org.example.controller.yy;

import io.swagger.annotations.Api;
import org.example.entity.yy.Topic;
import org.example.service.yy.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "主题")
@RequestMapping("/yy/zt")
@CrossOrigin
public class TopicController {
    @Autowired
    private TopicService topicService;

    //主题列表
    @RequestMapping("/list")
    public List<Topic> list(){
        return topicService.list(null);
    }
}
